package com.yunhai.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.yunhai.model.base.BaseEntity;
import lombok.Data;



import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * 实体
 *
 * @author mengze
 * @date 2025-07-13 17:04:13
 */
@ApiModel("实体")
@Data
@Accessors(chain = true)
@TableName("fms_formula_rule")
public class FmsFormulaRuleEntity {

	@ApiModelProperty(value = "主键id", example = "10001")
	@TableId(type = IdType.ASSIGN_ID)
	private Long id;
	/**
	 * 步骤
	 */
	@ApiModelProperty("步骤")
	private Integer stepSeq;
	/**
	 * 优先级
	 */
	@ApiModelProperty("优先级")
	private Integer seq;
	/**
	 * 规则条件
	 */
	@ApiModelProperty("规则条件")
	private String ruleCondition;
	/**
	 * 产品id
	 */
	@ApiModelProperty("产品id")
	private Long productId;
	/**
	 * 物料id
	 */
	@ApiModelProperty("物料id")
	private Long materialId;


	@ApiModelProperty("物料名称")
	@TableField( exist = false )
	private String materialName;
	/**
	 * 修改
	 */
	@ApiModelProperty("修改")
	private Integer operate;
	/**
	 * 数值
	 */
	@ApiModelProperty("数值")
	private Integer extralValue;

	@ApiModelProperty("最终数值")
	private String finalValue;

	@ApiModelProperty("基础数值")
	private Integer value;

	/**
	 * 百分比/固定值
	 */
	@ApiModelProperty("百分比/固定值")
	private Integer valueType;
	/**
	 * 备注
	 */
	@ApiModelProperty("备注")
	private String remark;

	//创建日期
	@JsonFormat( pattern = "YYYY-MM-dd HH:mm:ss")
	@TableField( value="create_time", fill= FieldFill.INSERT )
	private LocalDateTime createTime;
	//创建人
	@JsonIgnore
	@TableField( value="create_by", fill=FieldFill.INSERT )
	private String createBy;
	//更新时间
	@JsonFormat( pattern = "YYYY-MM-dd HH:mm:ss")
	@TableField( value="update_time", fill= FieldFill.INSERT_UPDATE )
	private LocalDateTime updateTime;
	//更新人
	@JsonIgnore

	@TableField( value="update_by", fill= FieldFill.INSERT_UPDATE )
	private String updateBy;
}
